function checkall(name, status, form) {
	form = form && form.constructor == String ? id(form) : form || document;
	var elems = query('input:checkbox', form).get();
	status = status ? "checked" : "";
	var pattern = new RegExp('^'+name+'(\\[|$)', 'i');
	map(elems, function(elem){
		if(pattern.test(elem.name))	elem.checked = status;
	});
}